<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title><%= title %></title>
	<link rel="stylesheet" href="/bootstrap/css/bootstrap.min.css">
	<link rel="stylesheet" href="/stylesheets/style.css">
	<script src="/javascripts/jquery-1.11.3.min.js"></script>
	<script src="/bootstrap/js/bootstrap.min.js"></script>
</head>
<body>
	<nav class="navbar navbar-inverse navbar-fixed-top">
		<div class="container-fluid">
			<div class="navbar-header">
				
				<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				</button>
				<a class="navbar-brand" href="/">My Web</a>
			</div>

			<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">

				<% if(user) { %>
				<!-- 列表1： 博客导航栏，左边 -->
				<ul class="nav navbar-nav navbar-left">
					<li><a href="/post">Post</a></li>
				</ul>
				<% } %>


				
				<ul class="nav navbar-nav navbar-right">
					<% if(user) { %>
						<li class="dropdown">
							<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
								<%= user.username %>
								<span class="cacet"></span>
							</a>

							
							<ul class="dropdown-menu">
								<li><a href="/u/<%= user.username %>"> About Me</a></li>
								<li><a href="/logout">Logout</a></li>
							</ul>
						</li>
					<% } else { %>
		
						<ul class="nav navbar-nav">
						<li><a href="/login">Login</a></li>
						<li><a href="/reg">Register</a></li>
						
					</ul>
					<% } %>
					</ul>

				
				<form class="navbar-form navbar-right" role="search" action="/search" method="get">
					<div class="form-group">
						<input type="text" class="form-control" name="search" placeholder="Search">
					</div>
					<button type="submit" class="btn btn-default">search</button>
					
				</form>				
			</div>
		</div>
	</nav>
	<div id="container" style="padding: 60px;">
